package hcom.model.etcInfo.dao;

import hcom.model.etcInfo.bean.EtcInfoBean;

import java.util.List;

import com.ibatis.dao.client.DaoManager;

import ecg.dao.DaoService;

public class EtcInfoDao {
	private static EtcInfoDao singleton;
	
	protected EtcInfoDao() {}
	
	public static EtcInfoDao getInstance() {
		if(singleton == null) {
			singleton = new EtcInfoDao();
		}
		
		return singleton;
	}
	
	private DaoManager	manager	= DaoService.getInstance();
	private IEtcInfo	etcInfo	= (IEtcInfo)manager.getDao(IEtcInfo.class, "hcom");
	
	/**
	 * 접근통제 아이피 목록
	 * @return
	 * @throws Exception
	 */
	public List<EtcInfoBean> getAclList() throws Exception {
		return etcInfo.getAclList();
	}
	
	/**
	 * 접근통제 아이피 갯수
	 * @return
	 * @throws Exception
	 */
	public int getAclCount() throws Exception {
		return etcInfo.getAclCount();
	}
	
	/**
	 * 접근통제 아이피 추가
	 * @param etcInfoBean
	 * @throws Exception
	 */
	public void insertAcl(EtcInfoBean etcInfoBean) throws Exception {
		etcInfo.insertAcl(etcInfoBean);
	}
	
	/**
	 * 접근통제 아이피 삭제
	 * @param ip_seq
	 * @throws Exception
	 */
	public void deleteAcl(int ip_seq) throws Exception {
		etcInfo.deleteAcl(ip_seq);
	}
	
	/**
	 * 로그인 로그 
	 * @return
	 * @throws Exception
	 */
	public List<EtcInfoBean> getLoginLog(EtcInfoBean etcInfoBean) throws Exception {
		return etcInfo.getLoginLog(etcInfoBean);
	}
	
	/**
	 * 통합코드 조회
	 * @return
	 * @throws Exception
	 */
	public List<EtcInfoBean> getCode() throws Exception {
		return etcInfo.getCode();
	}
	/**
	 * 리스트 조회
	 * @return
	 * @throws Exception
	 */
	public List<EtcInfoBean> caseLog() throws Exception {
		return etcInfo.caseLog();
	}
	
	public List<EtcInfoBean> courtLog() throws Exception {
		return etcInfo.courtLog();
	}
	
	public List<EtcInfoBean> logLog() throws Exception {
		return etcInfo.logLog();
	}
}
